package ma.jeetconsulting.pocs.persistence;

import ma.jeetconsulting.pocs.domain.Dependency;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

public interface DependencyRepository extends CrudRepository<Dependency, Long>{

	@Query("From Dependency as dp where dp.id = ?1")
	public Dependency findWithId(Long id);
	
	@Query("SELECT dp FROM Dependency AS dp WHERE dp.groupId = ?1 AND dp.artifactId = ?2 AND dp.version = ?3 ")
	public Dependency findDependency(String groupId, String artifactId, String version);
}
